-
Notifications
You must be signed in to change notification settings - Fork 267
Better handle auth when not using built-in auth #5954
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better handle auth when not using built-in auth #5954
Conversation
…-auth-when-using-az-for-auth
weikanglim
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Current change blocks the functionality of using --check-status functionality to check if azd is delegating to az
…-auth-when-using-az-for-auth
…-auth-when-using-az-for-auth
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enhances the authentication system to better handle scenarios where users are not using azd's built-in authentication. It addresses issue #5949 by introducing auth mode detection and allowing users to switch between authentication modes during the login flow.
Key changes:
- Adds
AuthModetype with three modes: built-in, delegated to az CLI, and external token request - Implements
Mode()method to detect the current authentication mode - Implements
SetBuiltInAuthMode()method to switch from az delegation to built-in mode - Updates login flow to warn users and prompt for mode switching when not in built-in mode
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| cli/azd/pkg/auth/manager.go | Adds AuthMode type and two new methods (Mode and SetBuiltInAuthMode) to detect and manage authentication modes |
| cli/azd/cmd/auth_login.go | Updates login action to detect auth mode and prompt users to switch to built-in mode if needed |
|
@vhvb1989 can we move this PR along? |
|
@copilot open a new pull request to apply changes based on the comments in this thread |
weikanglim
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for handling the check-status flag.
weikanglim
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good @vhvb1989 ! Thanks for doing this!
…dle-auth-when-using-az-for-auth
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
fix: #5949